/*
 * SurfaceUtils.h
 *
 *  Created on: Apr 15, 2012
 *      Author: gonzalo
 */

#ifndef SURFACEUTILS_H_
#define SURFACEUTILS_H_

#include "Logger.h"
#include "SDL/SDL_image.h"
#include "FileChecker.h"
#include "../../SDLtoolkit/Color.h"
#include "../../SDLtoolkit/Parcel.h"
#include "SDL/SDL_ttf.h"

class SurfaceUtils {
public:

	static SDL_Surface* resizeSurface(float newWidth, float newHeigth,
			SDL_Surface* originalSurface);
	static SDL_Surface* loadImage(std::string path);
	static SDL_Surface* renderText(std::string message);
	static SDL_Surface* colorSurface(int width, int height, Color color =
			Color::BLANCO);
	static SDL_Surface* transparentSurface(int width, int height);

	static Uint32 getTransparentColor();

	static SDL_Surface* renderText(std::string message, TTF_Font* font);
	static SDL_Surface* renderText(std::string message, int ptSize);
	static SDL_Surface* renderText(std::string message, TTF_Font* font, int r,
			int g, int b);
	static SDL_Surface* renderText(std::string message, int ptSize, int r,
			int g, int b);

	static SDL_Rect intersectionRect(const SDL_Rect& boundsA, const SDL_Rect& boundsB);
	static bool getAlphaXY(SDL_Surface* surface, int x, int y);
	static Uint32 get_pixel32(SDL_Surface *surface, int x, int y);
	static SDL_Surface* rotateSurface(SDL_Surface* surface, int angle);
};

#endif /* SURFACEUTILS_H_ */
